﻿@{
    ViewBag.Title = "T";
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>优惠券淘口令</title>

    <link href="~/Content/zk/css/tkl.css" rel="stylesheet" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width">
 

</head>
<body rlt="1">
    <div id="token" class="wrap"><input type="hidden" class="input-hidden" name="token"></div><table class="centerxy">
        <tbody>
            <tr>
                <td>
                    <div class="token">
                        <img src="~/Content/zk/img/app@2x.png" alt="手机淘宝"><textarea class=" product-token">￥@ViewBag.tkl￥</textarea><div class=" product-copy" data-clipboard-text="￥@(ViewBag.tkl)￥" id="copy_kl">复制淘口令</div><div class=" product-tip">打开「手机淘宝」即可「领取优惠券」并购买</div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
     <script src="https://cdn.bootcss.com/clipboard.js/1.6.1/clipboard.min.js"></script>
    <script>
        var clipboard = new Clipboard('#copy_kl');//实例化

        //复制成功执行的回调，可选
        clipboard.on('success', function (e) {
            document.getElementById('copy_kl').innerHTML='已复制！';
            console.log(e);
        });

        //复制失败执行的回调，可选
        clipboard.on('error', function (e) {
            console.log(e);
        });

    </script>
</body>
</html>

